﻿Imports QLPhuTungOto.Data

Public Class NguoiDungBUS
    Public Function LayDSNguoiDung()
        Dim db As New QLPhuTungOtoDataContext
        Return db.NguoiDung.LayDSNguoiDung
    End Function
    Public Sub XoaNguoiDung(ByVal maND As Integer)
        Dim db As New QLPhuTungOtoDataContext
        db.NguoiDung.Delete(maND)
    End Sub
    Public Sub SuaNguoiDung(ByVal nd As NguoiDung)
        Dim db As New QLPhuTungOtoDataContext
        db.NguoiDung.SuaNguoiDung(nd)
    End Sub
    Public Sub DoiMatKhau(ByVal nd As NguoiDung)
        Dim db As New QLPhuTungOtoDataContext
        db.NguoiDung.DoiMatKhau(nd)
    End Sub
    Public Function LayNguoiDungTheoMa(ByVal MaND As Integer) As NguoiDung
        Dim db As New QLPhuTungOtoDataContext
        Dim nd As New NguoiDung

        nd = db.NguoiDung.GetByKey(MaND)

        Return nd
    End Function
End Class
